<%- include header %>

  <div class="post">
    <form action="/edit/<%=user.name%>/<%=post._id%>" method="post">
        标题：<br/>
        <input value="<%= post.title %>" name="title" type="text" disabled /><br>

        标签：<br>
        <%tags.forEach(function(tag){
            if(!!~post.tags.indexOf(tag)){%>
                <input type="checkbox" name="tags" value="<%= tag %>" checked><%=tag%>
            <%}else{%>
            <input type="checkbox" name="tags" value="<%= tag %>"><%=tag%>
            <%}
        });%>

        <br>

        简介：<br/>
        <textarea name="desc" cols="50" rows="10"><%= post.desc %></textarea><br/>
        正文：<br/>
        <textarea name="content" cols="50" rows="10"><%= post.content %></textarea><br/>
        <input type="hidden" name="_id" value="<%= post._id %>"/>
        <input type="submit" value="提交"/>
    </form>
  </div>

<%- include footer %>